<?php 

$lang = PFactory::getLanguage();
$lang->load("com_jobs", JPATH_SITE, "zh-CN");

$terms = isset($_['terms']) ? $_['terms'] : array();

?>
      <div class="control-group pull-left" style="width:33%;">
         <label for="keyword" class="control-label key">关键字：</label>
         <div class="controls">
            <input type="text" class="input-large graycolor" name="keyword" value="<?php echo isset($terms['keyword']) ? $terms['keyword'] : "";?>" placeholder="例如：总监"/>
            <label id="keyworderr" style="display:none;" for="keyword" class="error">该项必填</label>
         </div>
      </div>
      <div class="control-group pull-left" style="width:33%;">
         <label for="workexp" class="control-label key">工作经验：</label>
         <div class="controls">
            <input type="text" name="workexp" value="<?php echo isset($terms['workexp']) ? $terms['workexp'] : "";?>" class="setnumber">
            <i class="inputword">年</i><span id="workexp_span">以上</span>
            <label style="display:none;" for="workexp" class="error">请输入合法的数字</label>
         </div>
      </div>
      <div class="control-group pull-left" style="width:33%;">
         <label for="degree_level" class="control-label key">学历要求：</label>
         <div class="controls">
            <select id="degree_level" name="degree_level">
               <?php $degree_level = isset($terms['degree_level']) ? $terms['degree_level'] : "";?>
               <option value="">--请选择--</option>
               <option value="1" <?php echo $degree_level == 1 ? "selected" : "";?>>初中</option>
               <option value="2" <?php echo $degree_level == 2 ? "selected" : "";?>>高中</option>
               <option value="3" <?php echo $degree_level == 3 ? "selected" : "";?>>中技</option>
               <option value="4" <?php echo $degree_level == 4 ? "selected" : "";?>>中专</option>
               <option value="5" <?php echo $degree_level == 5 ? "selected" : "";?>>大专</option>
               <option value="6" <?php echo $degree_level == 6 ? "selected" : "";?>>本科</option>
               <option value="7" <?php echo $degree_level == 7 ? "selected" : "";?>>硕士</option>
               <option value="8" <?php echo $degree_level == 8 ? "selected" : "";?>>MBA</option>
               <option value="9" <?php echo $degree_level == 9 ? "selected" : "";?>>博士</option>
            </select>
            <span>以上</span>
         </div>
      </div>
      <div class="control-group pull-left" style="width:33%;">
         <label for="agefrom" class="control-label key">年龄要求：</label>
         <div class="controls">
            <input type="text" name="agefrom" value="<?php echo isset($terms['agefrom']) ? $terms['agefrom'] : "";?>" class="setnumber">
            <i class="inputword">岁</i> <span>-</span>
            <input type="text" name="ageto" value="<?php echo isset($terms['ageto']) ? $terms['ageto'] : "";?>" class="setnumber">
            <i class="inputword position_long">岁</i>
            <label style="display:none;" for="agefrom" class="error">请输入数值为18至65的合法数字</label>
         </div>
      </div>
      <div class="control-group pull-left" style="width:33%;">
         <label for="" class="control-label key">现居住地：</label>
         <div class="controls">
            <?php
               $id_state = isset($terms['id_state']) ? $terms['id_state'] : "";
               $id_city = isset($terms['id_city']) ? $terms['id_city'] : "";
               $state = isset($terms['state']) ? $terms['state'] : "";
               $city = isset($terms['city']) ? $terms['city'] : "";
               $location = JobHelper::getSelectProvince("id_state", $id_state, 0, "");
               $location .= '<select id="id_city" name="id_city" defvalue="'.$id_city.'"></select>';
               $location .= '<input type="hidden" id="state" name="state" value="'.$state.'" />';
               $location .= '<input type="hidden" id="city" name="city" value="'.$state.'" />';
               echo $location;
            ?>
         </div>
      </div>
      <div class="control-group pull-left" style="width:33%;">
         <label for="expect_salary" class="control-label key">期望月薪：</label>
         <div class="controls">
            <input type="text" name="expect_salary" value="<?php echo isset($terms['expect_salary']) ? $terms['expect_salary'] : "";?>" class="setnumber">
            <i class="inputword">元</i><span id="expect_salary_span">以下</span>
            <label style="display:none;" for="expect_salary" class="error">请输入合法的数字</label>
         </div>
      </div>
      <div class="control-group pull-left" style="width:33%;">
         <label for="sex" class="control-label key">性别要求：</label>
         <div class="controls">
            <?php
               $male_checked = $female_checked = $nolimit_checked = "";
               if (isset($terms['sex'])) {
                  if ($terms['sex'] == 1) {
                     $male_checked = "checked";
                  } elseif ($terms['sex'] == 2) {
                     $female_checked = "checked";
                  } else {
                     $nolimit_checked = "checked";
                  }
               } else {
                  $nolimit_checked = "checked";
               }
            ?>
            <input type="radio" name="sex" class="school_level" value="0" <?=$nolimit_checked?>> <span class="fontsize">不限</span>
            <input type="radio" name="sex" style="margin-left:10px;" class="school_level" value="1" <?=$male_checked?>> <span class="fontsize">男</span>
            <input type="radio" name="sex" style="margin-left:10px;" class="school_level" value="2" <?=$female_checked?>> <span class="fontsize">女</span>
         </div>
      </div>
      <div class="control-group pull-left" style="width:33%;">
         <label for="job_status" class="control-label key">求职状态：</label>
         <div class="controls">
            <select id="job_status" name="job_status">
               <?php $job_status = isset($terms['job_status']) ? $terms['job_status'] : "";?>
               <option value="">--不限--</option>
               <option value="1" <?php echo $job_status == 1 ? "selected" : "";?>>目前正在找工作</option>
               <option value="2" <?php echo $job_status == 2 ? "selected" : "";?>>观望有好的机会再考虑</option>
               <option value="3" <?php echo $job_status == 3 ? "selected" : "";?>>不打算换工作</option>
            </select>
         </div>
      </div>
      <div class="control-group pull-left" style="width:33%;">
         <label for="" class="control-label key">简历更新：</label>
         <div class="controls">
            <select id="update_time" name="update_time">
               <?php $update_time = isset($terms['update_time']) ? $terms['update_time'] : "";?>
               <option value="">--请选择--</option>
               <option value="1" <?php echo $update_time == 1 ? "selected" : "";?>>一周内</option>
               <option value="2" <?php echo $update_time == 2 ? "selected" : "";?>>两周内</option>
               <option value="4" <?php echo $update_time == 4 ? "selected" : "";?>>一个月内</option>
               <option value="8" <?php echo $update_time == 8 ? "selected" : "";?>>两个月内</option>
               <option value="24" <?php echo $update_time == 24 ? "selected" : "";?>>六个月内</option>
            </select>
         </div>
      </div>
